package com.jeesite.modules.ele.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 手机信息表Entity
 * @author ccz
 * @version 2025-03-21
 */
@Table(name="ele_phone", alias="a", label="手机信息表信息", columns={
		@Column(name="phone_id", attrName="phoneId", label="手机ID", isPK=true),
		@Column(name="phone_num", attrName="phoneNum", label="手机编号"),
		@Column(name="phone_name", attrName="phoneName", label="手机名", queryType=QueryType.LIKE),
		@Column(name="phone_age", attrName="phoneAge", label="手机年限"),
		@Column(name="phone_status", attrName="phoneStatus", label="手机状态"),
		@Column(name="phone_create", attrName="phoneCreate", label="生成日期", isUpdateForce=true),
	}, orderBy="a.phone_id DESC"
)
public class ElePhone extends DataEntity<ElePhone> {
	
	private static final long serialVersionUID = 1L;
	private String phoneId;		// 手机ID
	private String phoneNum;		// 手机编号
	private String phoneName;		// 手机名
	private String phoneAge;		// 手机年限
	private String phoneStatus;		// 手机状态
	private Date phoneCreate;		// 生成日期

	public ElePhone() {
		this(null);
	}
	
	public ElePhone(String id){
		super(id);
	}
	
	public String getPhoneId() {
		return phoneId;
	}

	public void setPhoneId(String phoneId) {
		this.phoneId = phoneId;
	}
	
	@Size(min=0, max=64, message="手机编号长度不能超过 64 个字符")
	public String getPhoneNum() {
		return phoneNum;
	}

	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}
	
	@Size(min=0, max=64, message="手机名长度不能超过 64 个字符")
	public String getPhoneName() {
		return phoneName;
	}

	public void setPhoneName(String phoneName) {
		this.phoneName = phoneName;
	}
	
	@Size(min=0, max=64, message="手机年限长度不能超过 64 个字符")
	public String getPhoneAge() {
		return phoneAge;
	}

	public void setPhoneAge(String phoneAge) {
		this.phoneAge = phoneAge;
	}
	
	@Size(min=0, max=1, message="手机状态长度不能超过 1 个字符")
	public String getPhoneStatus() {
		return phoneStatus;
	}

	public void setPhoneStatus(String phoneStatus) {
		this.phoneStatus = phoneStatus;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPhoneCreate() {
		return phoneCreate;
	}

	public void setPhoneCreate(Date phoneCreate) {
		this.phoneCreate = phoneCreate;
	}
	
}